export interface ConversationProps {
  id: number;
  title: string;
  // AI 服务提供商名称，如：qianfan、deepseek等
  AI_providerName: string;
  // AI 模型名称，如：ERNIE-Speed-128K、deepseek-chat等
  AI_modelName: string;
  createdAt: string;
  updatedAt: string;
  msgList: MessageProps[];
}

// AI服务提供商
export interface ProviderProps {
  id: number;
  // AI服务提供商的英文名
  name: string;
  // AI服务提供商的中文名
  title?: string;
  // AI服务提供商的简介
  desc?: string;
  // AI服务提供商的头像
  avatar?: string;
  // AI服务提供商的模型列表
  models: string[];
}
export type MessageStatus = "loading" | "streaming" | "finished" | "error";

export interface MessageProps {
  content: string;
  type: "question" | "answer";
  status?: MessageStatus;
  createdAt: string;
  updatedAt: string;
  imagePath?: string;
}

export interface ChatMessageProps {
  role: string;
  content: string;
  imagePath?: string;
}
export interface CreateChatProps {
  messages: ChatMessageProps[];
  providerName: string;
  selectedModel: string;
  messageId: number;
}

export interface UpdatgedStreamData {
  messageId: number;
  data: {
    is_end: boolean;
    result: string;
    is_error?: boolean;
  };
}

export type OnUpdatedCallback = (data: UpdatgedStreamData) => void;

export interface AppConfig {
  language: 'zh' | 'en'
  fontSize: number
  providerConfigs: Record<string, Record<string, string>>
}



export interface AppConfig {
  language: 'zh' | 'en'
  fontSize: number
  providerConfigs: Record<string, Record<string, string>>
}